<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../00练习/react18/react.development.js"></script>
    <script src="../00练习/react18/react-dom.development.js"></script>
    <script src="../00练习/react18/babel.min.js"></script>
    <style>
        .box{
            width: 300px;
            height: 100px;
            background-color: blueviolet;
        }
    </style>
</head>
<body>
    <div id="add"></div>
    <!-- 规定script标签的类型 -->
    
    <!-- <script>
        // JS方法创建虚拟对象

        //创建一个虚拟DOM对象
        const vNode = React.createElement("h1",{className : "box"},"今天天气真奇怪")

        //创建容器并渲染DOM树
        ReactDOM.createRoot(document.getElementById("add")).render(vNode)
    </script> -->

    <script type="text/babel">
        const vCode = (
            <div className = "box">
                <h1>JSX</h1>
                <p>是啥</p>
            </div>
        )

        ReactDOM.createRoot(document.getElementById("add")).render(vCode)
         
    </script>
</body>
</html>